import Window from './src/main.vue'
import {App, createVNode, h, render} from 'vue'
Window.install = (app: App) => {
    app.component('web-window',Window)
}
/** 函数式打开窗口 */
Window.open = (
    id:string,
    windowConfig:{top:string|number,left:string|number,width:string|number,height:string|number,iconUrl:string,title:string|number},
    type:string = 'default' ) => {
    const VNode = createVNode(Window,{ type,windowConfig,id })
    const content:any = document.createElement('div')
    render(VNode,content)
    document.body.appendChild(content.firstElementChild)
}

export default Window
